import request from "@/utils/request";
import { ParseData } from "@/utils/utils";

//获取品牌列表分页
export const GetBrandList = (data: any) => {
  return request({
    method: "GET",
    url: `/pinpai?${ParseData(data)}`,
  });
};
//新建品牌
export const AddBrand = (data: any) => {
  return request({
    method: "POST",
    url: `/pinpai`,
    data,
  });
};
//编辑品牌
export const EditBrand = (data: any) => {
  return request({
    method: "PUT",
    url: `/pinpai`,
    data,
  });
};
//查询品牌
export const GetBrand = (data: any) => {
  return request({
    method: "GET",
    url: `/pinpai/${data.id}`,
  });
};
//品牌详情
export const GetBrandDetail = (data: any) => {
  return request({
    method: "GET",
    url: `/pinpai/xiangqing/${data.id}`,
  });
};
//审核品牌
export const ReviewBrand = (data: any) => {
  return request({
    method: "PUT",
    url: `/pinpai/shenhe`,
    data,
  });
};
//品牌备注
export const NoteBrand = (data: any) => {
  return request({
    method: "PUT",
    url: `/pinpai/beizhu`,
    data,
  });
};
//删除品牌
export const DeleteBrand = (data: any) => {
  return request({
    method: "DELETE",
    url: `/pinpai/${data.id}`,
  });
};
// 品牌下拉菜单查询
export const GetBrandSelect = () => {
  return request({
    method: "GET",
    url: `/pinpai/xialaliebiao`,
  });
};
// 品牌详情--获取合作项目列表分页
export const GetBrandProjectList = (data: any) => {
  return request({
    method: "GET",
    url: `/pinpai/xiangqing/hezuoxiangmu?${ParseData(data)}`,
  });
};
// 品牌详情--合作项目删除
export const DeleteBrandProject = (data: any) => {
  return request({
    method: "DELETE",
    url: `/pinpai/xiangqing/hezuoxiangmu/${data.id}`,
  });
};
// 品牌详情--添加合作项目
export const AddBrandProject = (data: any) => {
  return request({
    method: "POST",
    url: `/pinpai/xiangqing/hezuoxiangmu`,
    data,
  });
};
// 品牌详情--获取品牌点评列表
export const GetBrandCommentList = (data: any) => {
  return request({
    method: "GET",
    url: `/pinpai/xiangqing/dianping?${ParseData(data)}`,
  });
};
// 品牌详情--品牌点评置顶
export const AddTopBrandCommentList = (data: any) => {
  return request({
    method: "PUT",
    url: `/pinpai/xiangqing/dianping/zhiding/${data.id}`,
  });
};
// 品牌详情--品牌点评加V
export const AddVBrandCommentList = (data: any) => {
  return request({
    method: "PUT",
    url: `/pinpai/xiangqing/dianping/renzhengjiav/${data.id}`,
  });
};
// 品牌导入
export const BrandUpload = (data: any) => {
  return request({
    method: "POST",
    url: `/pinpai/daoru`,
    data,
  });
};
// 品牌详情-合作项目选择
export const GetSelectProject = (data: any) => {
  return request({
    method: "GET",
    url: `/xiangmu/xuanze?${ParseData(data)}`,
  });
};
